<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精品推荐 - 在线学习平台</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background-color: #f3f5f7;
            color: #333;
            line-height: 1.6;
        }
        
        .w {
            width: 1200px;
            margin: 0 auto;
        }
        
        .box {
            margin-top: 30px;
            padding: 20px 0;
        }
        
        .box-hd {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 10px;
            border-bottom: 1px solid #eaeaea;
        }
        
        .box-hd h3 {
            font-size: 24px;
            color: #333;
            font-weight: 600;
            position: relative;
            padding-left: 15px;
        }
        
        .box-hd h3::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 20px;
            background-color: #ff7c2d;
            border-radius: 2px;
        }
        
        .box-hd a {
            font-size: 14px;
            color: #666;
            text-decoration: none;
            display: flex;
            align-items: center;
            transition: color 0.3s;
        }
        
        .box-hd a:hover {
            color: #ff7c2d;
        }
        
        .box-hd a::after {
            content: '→';
            margin-left: 5px;
            font-weight: bold;
        }
        
        .box-bd ul {
            display: flex;
            flex-wrap: wrap;
            list-style: none;
            gap: 20px;
        }
        
        .box-bd ul li {
            width: calc(25% - 15px);
            background-color: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .box-bd ul li:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        
        .box-bd ul li img {
            width: 100%;
            height: 160px;
            object-fit: cover;
            display: block;
        }
        
        .box-bd ul h4 {
            padding: 15px 15px 10px;
            font-size: 16px;
            color: #333;
            font-weight: 500;
            line-height: 1.4;
            height: 68px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        
        .box-bd .info {
            padding: 0 15px 15px;
            font-size: 13px;
            color: #999;
            display: flex;
            justify-content: space-between;
        }
        
        .box-bd .info span {
            color: #ff7c2d;
            font-weight: 500;
        }
        
        .level {
            display: inline-block;
            padding: 2px 6px;
            background-color: #fff2e8;
            color: #ff7c2d;
            border-radius: 3px;
            font-size: 12px;
        }
        
        /* 响应式设计 */
        @media (max-width: 1200px) {
            .w {
                width: 96%;
                padding: 0 2%;
            }
            
            .box-bd ul li {
                width: calc(33.333% - 15px);
            }
        }
        
        @media (max-width: 768px) {
            .box-bd ul li {
                width: calc(50% - 10px);
            }
            
            .box-hd h3 {
                font-size: 20px;
            }
        }
        
        @media (max-width: 480px) {
            .box-bd ul li {
                width: 100%;
            }
            
            .box-hd {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .box-hd a {
                margin-top: 10px;
            }
        }
    </style>
</head>
<body>
    <div class="box w">
        <div class="box-hd">
            <h3>精品推荐</h3>
            <a href="#">查看全部</a>
        </div>
        <div class="box-bd">
            <ul>
                <img src="./images/course01.png" alt="">
            </ul>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const data = [
                {
                    src: './images/course01.png',
                    title: 'Think PHP 5.0 博客系统实战项目演练',
                    level: '高级',
                    num: 1125
                },
                {
                    src: './images/course02.png',
                    title: 'Android 网络动态图片加载实战',
                    level: '中级',
                    num: 357
                },
                {
                    src: './images/course03.png',
                    title: 'Angular2 大前端商城实战项目演练',
                    level: '高级',
                    num: 22250
                },
                {
                    src: './images/course04.png',
                    title: 'Android APP 实战项目演练',
                    level: '中级',
                    num: 389
                },
                {
                    src: './images/course05.png',
                    title: 'UGUI 源码深度分析案例',
                    level: '高级',
                    num: 124
                },
                {
                    src: './images/course06.png',
                    title: 'Kami2首页界面切换效果实战演练',
                    level: '初级',
                    num: 432
                },
                {
                    src: './images/course07.png',
                    title: 'UNITY 从入门到精通实战案例',
                    level: '中级',
                    num: 888
                },
                {
                    src: './images/course08.png',
                    title: 'Cocos 深度学习你不会错过的实战',
                    level: '高级',
                    num: 590
                }
            ];

            const ul = document.querySelector('ul');
            
            data.forEach(item => {
                const li = document.createElement('li');
                li.innerHTML = `
                    <img src="${item.src}" alt="${item.title}">
                    <h4>${item.title}</h4>
                    <div class="info">
                        <span class="level">${item.level}</span>
                        <span>${item.num.toLocaleString()}人在学习</span>
                    </div>
                `;
                ul.appendChild(li);
            });
        });
    </script>
</body>
</html>